package com.veepeak.server.domain;

import com.veepeak.server.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@DynamicUpdate
@DynamicInsert
@Table(name = "user_vehicle")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString
public class UserVehicle extends BaseEntity {
    @ManyToOne
    @JoinColumn(name = "user_id")
    private User user ;
    @ManyToOne
    @JoinColumn(name = "vehicle_id")
    private Vehicle vehicle;
}
